package com.woniu.product.controller;


import com.woniu.entity.Result;
import com.woniu.product.pojo.WarehouseInfo;
import com.woniu.product.service.IWarehouseInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 仓库信息表 前端控制器
 * </p>
 *
 * @author LiFangyu
 * @since 2023-02-15
 */
@Api(tags = "仓库信息表")
@RestController
@RequestMapping("/warehouse-info")
public class WarehouseInfoController {

    @Autowired
    private IWarehouseInfoService warehouseInfoService;

    @GetMapping("/{id}")
    @ApiOperation("根据仓库Id查询仓库名")
    public Result<WarehouseInfo> getNameById(@PathVariable String id){
        WarehouseInfo infoList = warehouseInfoService.getNameById(id);
        String warehoustName = infoList.getWarehoustName();
        //有问题
        return Result.ok();
    }
}
